//
//  NSString+AttributedString.h
//  MengLiao
//
//  Created by xiuxin on 2022/7/15.
//  Copyright © 2022 BaseBusiness. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface NSString (AttributedString)


//设置富文本中间删除线
+ (NSAttributedString*)addeleteLineWithSring:(NSString*)String
                                    attColor:(UIColor *)lineColor;
+ (NSAttributedString*)addeleteLineWithSring:(NSString*)String
                                    attColor:(UIColor *)lineColor
                                     atRange:(NSRange)range;

//设置富文本下划线
+ (NSAttributedString*)makeunderLineWithSring:(NSString*)String
                                     attColor:(UIColor *)lineColor;
+ (NSAttributedString*)makeUnderLineWithSring:(NSString*)String
                                     attColor:(UIColor *)lineColor
                                      atRange:(NSRange)range;

//设置一段文字字体颜色&&字体大小
+ (NSAttributedString*)makeForegroundWithSring:(NSString*)String
                                      attColor:(UIColor *)attColor
                                       atRange:(NSRange)range;
+ (NSAttributedString*)makeForegroundWithSring:(NSString*)String
                                      attColor:(UIColor *)attColor
                                      Forefont:(UIFont *)font
                                   defaultFont:(UIFont *)defaultFont atRange:(NSRange)range;//方法有点龌蹉

//可以为文本的任意段落设置不同颜色
+ (NSAttributedString*)makeForegroundWithSring:(NSString*)String
                                      attColor:(UIColor *)attColor
                                      Forefont:(UIFont *)font
                                       atRange:(NSArray *)StringArray;

+ (NSAttributedString*)makeForegroundWithSrings:(NSArray*)Strings
                                      attColors:(NSArray *)attColors
                                      Forefonts:(NSArray *)fonts;


+ (NSAttributedString*)makeForegroundWithSrings:(NSArray*)Strings
                                      attColors:(NSArray *)attColors
                                      forefonts:(NSArray *)fonts
                                        offsets:(NSArray<NSNumber*>*)offsets;


+ (NSAttributedString*)makeForegroundWithSrings:(NSArray*)Strings
                                      attColors:(NSArray *)attColors
                                      Forefonts:(NSArray *)fonts
                                  textAlignment:(NSTextAlignment)textAlignment;

@end
